package com.xuhuan.demo.pattern.adapter.objectadapter;

/**
 * @author huan.xu
 * @date 2021/10/5 23:11
 * @description 客户端
 */
public class Client {

    public static void main(String[] args) {
        System.out.println("------------------使用对象适配器------------------");
        System.out.println("------------------开始给5V手机充电------------------");
        new Phone().charging(new VoltageAdapter(new Voltage220V()));
        System.out.println();
        System.out.println("--------------开始给110V快充手机充电--------------");
        new QuickPhone().charging(new VoltageAdapter(new Voltage220V()));
    }
}
